import ajax from './ajax.js'
import ajaxs from './ajaxs.js'
import ajaxg from './ajaxg.js'
// const BASE_URL = 'http://121.89.194.226/'; //测试服务器地址
// const BASE_URL = 'http://192.168.0.102/';
const BASE_URL = 'https://www.iotry.net/RuoYi/';
// const BASE_URLX = '192.168.0.100:80/';
// const PAYMENT_URL = 'https://pay.gaofans.com/';						
// 获取今日数据
const selectRestItem = (params) => ajax( BASE_URL + 'rest/order/selectRestItem', params)
//今日菜品播报
const broadcast = (params) => ajax( BASE_URL + 'rest/item/broadcast', params)
//猜你喜欢
const selectLickRestItem = (params) => ajax( BASE_URL + 'rest/order/selectLickRestItem', params)
//详情页
const lists = (params) => ajax( BASE_URL + 'rest/item/selectRestItem', params)
const selectQueryRestItem = (params) => ajax( BASE_URL + 'rest/item/selectQueryRestItem', params)
//新增购物车
const addShop = (params) => ajaxs( BASE_URL + "rest/cat/add", params)
//查询购物车信息
const selectShoppingCat = (params) => ajax( BASE_URL + 'rest/item/selectShoppingCat', params)
//删除购物车信息
const remove = (params) => ajax( BASE_URL + 'rest/cat/remove', params)
//列表详情
const selectTable = (params) => ajax( BASE_URL + 'meal/release/selectTable', params)
//主食
const selecFoodList = (params) => ajax( BASE_URL + 'rest/item/selecFoodList', params)
//生成订单编号
const SoleCode = (params) => ajax( BASE_URL + 'rest/order/SoleCode', params)
//生成订单
const addSave = (params) => ajaxs( BASE_URL + 'rest/order/addSave', params)
//获取公司地址
const logincustomer = (params) => ajax( BASE_URL + 'system/customer/list', params)
//获取会员信息
const restList = (params) => ajax( BASE_URL + 'rest/customer/list', params)
//优惠券
const exchange = (params) => ajax( BASE_URL + 'system/coupon/exchange', params)
//查询优惠券
const selectUserContro = (params) => ajax( BASE_URL + 'system/coupon/selectUserContro', params)
//兑换优惠券列表
const couponList = (params) => ajax( BASE_URL + 'system/coupon/list', params)
//登录
const add = (params) => ajax( BASE_URL + 'rest/customer/add', params)
//删除优惠券
const controller = (params) => ajax( BASE_URL + 'system/controller/remove', params)
//获取oppenid
const selectOppenId = (params) => ajax( BASE_URL + 'rest/customer/selectOppenId', params)
//订单成功返回的信息
const selectShopping = (params) => ajax( BASE_URL + 'rest/item/selectShopping', params)
//默认地址
const selectCustomerAddress = (params) => ajaxg( BASE_URL + 'rest/customer/selectCustomerAddress', params)
//清空购物车
const deleteAll = (params) => ajax( BASE_URL + 'rest/cat/deleteAll', params)

const performTask = (params) => ajaxg( BASE_URL + 'rest/order/ordNo', params)

export default{
	selectRestItem,
	broadcast,
	lists,
	selectQueryRestItem,
	selectLickRestItem,
	addShop,
	selectShoppingCat,
	remove,
	selectTable,
	selecFoodList,
	addSave,
	logincustomer,
	SoleCode,
	restList,
	exchange,
	selectUserContro,
	couponList,
	add,
	controller,
	selectOppenId,
	selectShopping,
	selectCustomerAddress,
	deleteAll,
	performTask,
	

}
